class Admin::BaseController < ApplicationController
  layout 'admin/main'
  # 指定的方法将不受过滤器过滤
  before_filter :authorize, :except => [:login, :show, :logout]
  
  def index
    redirect_to :controller => 'admin/login', :action => 'show'   
  end
  
  def authorize
    if session[:admin].nil?
      redirect_to :controller => 'admin/login', :action => 'show'
    end
  end
end